home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Software Vault: The Gold Collection
/
Software Vault - The Gold Collection (American Databankers) (1993).ISO
/
cdr29
/
mkey12.zip
/
MKEY.DOC
< prev
next >
Wrap
Text File
|
1991-12-18
|
8KB
|
193 lines
MKey
Version 1
Rev 0
by Gary Chanson
(C) 1991
MKey and MCONFIG are Copyright 1991 by Gary Chanson and
Starquest Systems. No restrictions are placed on the
use or copying of these programs, except that they may
not be used for commercial purposes without a license.
Description:
MKey is an event handler for the PC mouse which translates mouse
events such as movement and button presses into keystrokes
usable by application software. MKey installs a tiny (less than
600 bytes) resident program attached to your mouse driver. It
is re-configurable and removeable. It can be also be re-enabled
if an application disables it.
MKey can generate any scan code a keyboard can generate.
Keystrokes can be generated on any movement, on pressing or
releasing either button, or on pressing both buttons (the third
button on three button mice is not supported). The scaling
factor for movement is also customizable.
MKey can read its configuration from a data file and comes with
a configuration program (MCONFIG.COM) which produces MKey
configuration files.
MKey saves the state of the mouse driver event handler when it
is loaded and restores it when removed. This feature can be
used to shield programs which use the mouse from being
de-activated by other programs which might be executed from
within it.
MKey can be used within multitasking environments such as
DESQview (tm) from within several windows simultaneously, as
long as it is installed after the multitasker is running, and in
each window which it will be used within.
Usage:
MKey must be loaded before any application with which you would
like to use the mouse. If you have created a configuration file
for your application, its name (and path) should be included in
the command tail. For instance, if your application is QEDIT,
and you have a configuration file called QEDIT.MKC located in
C:\UTILS, the command would look like:
MKEY C:\UTILS\QEDIT.MKC
After using QEDIT, run MKey again, and replace the file name
with the `R' switch (/r or -r) to remove the resident event
handler.
If you use several applications, you can run MKey between them
to re-configure it for each application. You do not have to
remove it until you are done. Each time it is run, it will look
for the resident event handler, and the re-configuration will be
performed on it. Note that MKey can not search upper memory for
the resident event handler.
You can force MKey to ignore any resident event handler already
installed by using the `N' switch. This allows for nesting one
application within another without interference.
Running MKey with no options or file names will re-enable the
current configuration without changing it. This is useful if an
application which already uses the mouse is run, and leaves the
mouse driver disabled. The `D' switch is useful when the mouse
might interfere with the operation of an application. MKey will
remain disabled until run again.
The `Q' switch suppresses display of error messages.
Running MKey with the `?' switch displays a help screen and the
revision level.
If you are running MKey from a batch file (most likely, you
are), you can use ERRORLEVEL to test for MKey errors. See
"Error levels" for a listing of codes returned. Your batch file
might look like this:
MKEY c:\utils\qedit.mkc
IF ERRORLEVEL 1 QUIT
QEDIT %1 %2 %3 %4
MKEY -r
Configuration:
MKey comes with a configuration program call MCONFIG. MCONFIG
generates configuration files which MKey can read to setup its
configuration for each application. To create or modify a
configuration file,run MCONFIG with the file name as its command
tail. If the file name does not have an extension, the default
extension `.MKC' will be used. Running MCONFIG without any tail
displays a brief help screen. To modify (or create) the file
QEDIT.MKC in C:\UTILS enter:
MCONFIG c:\utils\qedit
MCONFIG displays a menu of all of MKey's configurable parameters
and displays their current settings. For each of the 9 events,
the name of the key assigned is shown (disabled events are shown
as `[disabled]'). The scale factors for vertical and horizontal
movement are also shown. Movement scale factors are displayed
in "Mickeys per character".
To change a setting, press the hot key for the appropriate
function. MCONFIG will prompt you for a key to assign to that
function. You can enter any key or key combination at this
prompt. To disable a function, enter `ctrl @' (this key can not
be entered by MCONFIG, but can be patched into data files with
DEBUG or a hex editor). To modify the movement scale factors,
select the `V' or `H' choices from the menu. You will be
prompted for a new setting. Numbers are assumed to be in
decimal unless prefaces with a `$'.
When you have completed modifications to the configuration file,
press `X' to save the file and exit MCONFIG. To abort
modifications, press `Q' to quit MCONFIG without saving file.
Switches:
-d Disable event handler
-n Nest event handlers
-r Remove event handler
-q Quiet; suppresses display of error messages
-? display help screen
Error levels:
0 no error
1 configuration file not found
2 un-recognized option switch
3 no resident handler found (not removed)
4 no mouse driver found
Patching:
The format of MKey configuration files is the same as the format
of MKey's parameter table. The parameter table is located at an
offset of 3 bytes in the MKEY.COM file (address 103H in DEBUG).
Each event has a 2 byte entry in the parameter table. The first
byte is the ASCII code and the second byte is the scan code of
the keystroke which will be feed into the keyboard buffer.
Vertical and horizontal movement scale factors are each one 16
bit word. The table has 11 entries totaling 22 bytes.
offset default key function
00 4800H up movement up
02 5000H down movement down
04 4B00H left movement left
06 4D00H right movement right
08 0000H left button press
10 000DH enter left button release
12 0000H right button press
14 001BH esc right button release
16 3B00H F1 both buttons pressed
18 24 vert speed (mickeys/char)
20 24 horz speed (mickeys/char)
-----------------------------------------------------------------------
Please forward all comments and bug reports to:
Gary Chanson
360 Waltham Street
West Newton, MA USA 02165-1732
Voice: 617-527-7206
Email: BCS-IBM BBS - 617-332-5584